#!/usr/bin/python
import web
from pymongo import MongoClient

render = web.template.render("templates")
urls = ('/', 'index')
client = MongoClient()
db = client['tut']
c = db['person']

class index:
    def GET(self):
        found = list(c.find())
        return render.index(found)

if __name__ == '__main__':
    app = web.application(urls, globals())
    app.run()
